package com.fanhang.samples.spring.rmi.server.service;

import com.fanhang.samples.spring.rmi.api.entity.Subject;
import com.fanhang.samples.spring.rmi.api.service.StudentService;

public class StudentServiceImpl implements StudentService {

	@Override
	public String pray(String msg) {
		if ("挂柯南".equals(msg)) {
			return "挂科难";
		}
		return "Good luck...";
	}

	@Override
	public String exam(Subject subject) {
		String code = subject.getCode();
		String name = subject.getName();
		String result = String.format("考试科目: [%-4s] - %s", code, name);
		System.out.println(result);
		return result;
	}

	
	
	
}
